#ifndef H_A2MOUSE
#define H_A2MOUSE

#ifndef __FOR_WINDOWS__

#define A2M_LEFT   1
#define A2M_RIGHT  2
#define A2M_MIDDLE 4

#define A2M_MOV 0x0001 /* move  */

#define A2M_LDN 0x0002 /* press */
#define A2M_LUP 0x0004
#define A2M_RDN 0x0008
#define A2M_RUP 0x0010
#define A2M_MDN 0x0020
#define A2M_MUP 0x0040

#define A2M_LWT 0x0080 /* wait  */
#define A2M_RWT 0x0100
#define A2M_MWT 0x0200

#define A2M_LCK 0x0400 /* click */
#define A2M_RCK 0x0800
#define A2M_MCK 0x1000

#define A2M_LDK 0x2000 /* double click */
#define A2M_RDK 0x4000
#define A2M_MDK ((int)0x8000U)


typedef struct {
   int flags, NButton, Buttons, xGPos,yGPos, xTPos,yTPos;
} a2M_CSTAT;

typedef struct {
   int txAND,txXOR, xSpot,ySpot, grAND[16],grXOR[16];
} a2M_CMASK;


#define A2M_TEXT  0  /* constants */  /*----------*/
#define A2M_GRPH  1  /* for grFlg */  /* for type */
#define A2M_DEF   2                   /*----------*/

#define A2M_GET   0  /* constants */
#define A2M_SET   1  /* for  op   */
#define A2M_SWAP  2  /* --------- */

#ifdef __cplusplus
extern "C" {
#endif

int a2MouseOpen   (void);
int a2MouseClose  (void);
int a2MouseType   (int type);
int a2MouseShow   (void);
int a2MouseHide   (void);
int a2MouseMask   (a2M_CMASK *cmask, int op);
int a2MouseState  (a2M_CSTAT *cstat);
int a2MouseSetPos (int xPos,int yPos, int grFlg);
int a2MouseClear  (void);
int a2MouseEvents (a2M_CSTAT *cstat); /* all events without MOVE */
int a2MouseEvent  (a2M_CSTAT *cstat); /* all CLICKs & DBLCLICKs  */

#ifdef __cplusplus
}
#endif

# endif /* Windows  */
#endif /* H_A2MOUSE */
